package com.yxt.common.sys;

import java.text.SimpleDateFormat;
import java.util.Date;

public class DateUtil {
	
	public static String getTimeFromStyle(String template) {
		SimpleDateFormat format = new SimpleDateFormat();
		format.applyLocalizedPattern(template);
		return format.format(new Date());
	}
	
	public static String getIntervalDays(Date now) {
		StringBuffer buffer = new StringBuffer();
		int date = now.getDate();
		int month = now.getMonth() + 1;
		buffer.append(month+"月"+date+"日 ");
		return buffer.toString();
	}
}